-
You could improve the stop watch by adding a decimal point. To do this you will need to clear the "decimal point" bit in the LED which is in the appropriate position.
-
You could further improve the stop watch by adding a "lap"button. When this button is pressed the counter continues to run but the number on the LEDs freezes. To do this you will need another state, which you could call "LAPTIME". You will also need to decide on how to handle events when you are in lap mode, i.e. when the lap time is being displayed do you allow the user to stop and start the watch itself. To finalise the design you should create a state diagram which shows the three states the watch can occupy and the events which cause the states to change. You will also have think about behaviour in the foreground and background states when events occur.
Exercise 4.9